Platform Explorer / Nuxeo Platform LTS 2019 10.10

Extension point computer

Documentation

Extension point to contribute a new class to compute virtual groups.

The contribution should be as the following example :

    <groupComputer name="MyGroupComputerName">
        <computer>fullClassName</computer>
    </groupComputer>

The contributed class must implement the org.nuxeo.ecm.platform.computedgroups.GroupComputer interface.

To simplify the Computer group generation you can also contribute a simple group computer without java code contribution based on

  • user profile metadata (military grade given a abilitation level, for instance)
  • metadata given a list of documents (ex: local group)

For the first case, you just have to contribute:

    <userMetadataGroupComputer enabled="false" groupPattern="grade_%s"
        name="grade_cg" xpath="company"/>

Here for each user, during the connection time, Nuxeo affect the group grade_xxx where xxx the value of the company metadata stored into the user profile. If the company metadata is empty or contains only spaces No group is affected to the user.

For the second possibility (metadata given a list of documents), you just have to contribute:

    <documentMetadataGroupComputer groupPattern="creator_%s"
        name="creator_cg" whereClause="dc:creator = '%s'" xpath="dc:title"/>

Here, we select documents created by the user. For each document found, we affect the group creator_xxx where xxx is the title of the document. But you can also try this:

    <documentMetadataGroupComputer groupPattern="creator_%s"
        name="creator_cg" whereClause="dc:creator = '%s'" xpath="ecm:uuid"/>

Here, xxx is replaced by the id of the document. XPath value is based on NXQL query and fetch selector. See the NXQL documentation to have more information.

Contribution Descriptors

  • Class: org.nuxeo.ecm.platform.computedgroups.GroupComputerDescriptor
  • Class: org.nuxeo.ecm.platform.computedgroups.UserMetadataGroupComputerDescriptor
  • Class: org.nuxeo.ecm.platform.computedgroups.DocumentMetadataGroupComputerDescriptor

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.